babl: add single precision cmm matrices
authorØyvind Kolås <pippin@gimp.org>
Sat, 26 Aug 2017 20:55:28 +0000 (22:55 +0200)
committerØyvind Kolås <pippin@gimp.org>
Wed, 30 Aug 2017 01:53:57 +0000 (03:53 +0200)
babl/babl-space.c
babl/babl-space.h

index b3385b61831cb3653f5c76049aba4e85af337d70..77d4d42b0fd8ec9df4f43e1fe4802d5f71f2be0b 100644 (file)
@@ -183,6 +183,9 @@ babl_space_from_rgbxyz_matrix (const char *name,
   space.RGBtoXYZ[8] = bz;
   babl_matrix_invert (space.RGBtoXYZ, space.XYZtoRGB);
 
+  babl_matrix_to_float (space.RGBtoXYZ, space.RGBtoXYZf);
+  babl_matrix_to_float (space.XYZtoRGB, space.XYZtoRGBf);
+
   space_db[i]=space;
   space_db[i].instance.name = space_db[i].name;
   if (name)
index a6065dd7bdc063426b7f57ff7d72948f0f10e756..c256ac2aad6284d325ffe1638b503475019efbc7 100644 (file)
@@ -46,8 +46,11 @@ typedef struct
   const Babl      *trc[3];
   char             name[128];
   double whitepoint[3]; /* CIE XYZ whitepoint */
+
   double RGBtoXYZ[9]; /* matrices for conversions */
   double XYZtoRGB[9];
+  float  RGBtoXYZf[9]; /* matrices for conversions */
+  float  XYZtoRGBf[9];
 
   /* the space should contain matrix to/from XYZ */
   /* and before converting a span, all that needs to be